<div>
    <h2>
        <span jhiTranslate="bookstoreApp.shoppingCart.home.title">Shopping Carts</span>
      <!--  <button  *jhiHasAnyAuthority="'ROLE_ADMIN'" class="btn btn-primary float-right jh-create-entity create-shopping-cart" [routerLink]="['/', { outlets: { popup: ['shopping-cart-new'] } }]">
            <span class="fa fa-plus"></span>
            <span  jhiTranslate="bookstoreApp.shoppingCart.home.createLabel">
            Create new Shopping Cart
            </span>
        </button>-->
    </h2>
    <jhi-alert></jhi-alert>
    <div class="row">
    </div>
    <br/>
    <div class="table-responsive" *ngIf="shoppingCarts">
        <table class="table table-striped">
            <thead>
            <tr>
            <!--<th><span jhiTranslate="global.field.id">ID</span></th>-->
            <th><span jhiTranslate="bookstoreApp.shoppingCart.userId">User Id</span></th>
            <th><span jhiTranslate="bookstoreApp.shoppingCart.bookId">Book Id</span></th>
            <th><span jhiTranslate="bookstoreApp.shoppingCart.bookPrice">Book Price</span></th>
            <th><span jhiTranslate="bookstoreApp.shoppingCart.jhiNumber">Jhi Number</span></th>
            <!--<th><span jhiTranslate="bookstoreApp.shoppingCart.status">Status</span></th>-->
            <th><span jhiTranslate="bookstoreApp.shoppingCart.orderTime">Order Time</span></th>

            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let shoppingCart of shoppingCarts ;trackBy: trackId">
                <!--<td><a [routerLink]="['../shopping-cart', shoppingCart.id ]">{{shoppingCart.id}}</a></td>-->
                <td>{{shoppingCart.userId}}</td>
                <td >{{shoppingCart.bookId.bookName}}</td>
                <td>{{shoppingCart.bookPrice}}</td>
                <td>{{shoppingCart.jhiNumber}}</td>
                <!--<td>{{shoppingCart.status}}</td>-->
                <td>{{shoppingCart.orderTime | date:'medium'}}</td>
                <td class="text-right">
                    <div class="btn-group flex-btn-group-container">
                       <!-- <button type="submit"
                                [routerLink]="['../shopping-cart', shoppingCart.id ]"
                                class="btn btn-info btn-sm">
                            <span class="fa fa-eye"></span>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
                        </button>-->
                  <!--      <button type="submit"
                                [routerLink]="['/', { outlets: { popup: 'shopping-cart/'+ shoppingCart.id + '/edit'} }]"
                                replaceUrl="true"
                                queryParamsHandling="merge"
                                class="btn btn-primary btn-sm">
                            <span class="fa fa-pencil"></span>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
                        </button>-->
                        <button *jhiHasAnyAuthority="'ROLE_USER'" class="btn btn-info" >

                            <span class="d-none d-md-inline">({{shoppingCart.bookPrice}}¥)</span>
                        </button>

                        <button type="submit"
                                [routerLink]="['/', { outlets: { popup: 'shopping-cart/'+ shoppingCart.id + '/delete'} }]"
                                replaceUrl="true"
                                queryParamsHandling="merge"
                                class="btn btn-danger btn-sm">
                            <span class="fa fa-remove"></span>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
                        </button>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <div style="padding-right:10px;margin-right: 10px">
        <span >总计：￥{{totalmoney}}
            <button type="button" class="btn btn-success" (click)="finish()" >
                <span>结算</span>
            </button>
        </span>

    </div>

</div>

</div>
